﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Threading;
using Microsoft.Forums.OfflineStore;

namespace Microsoft.Forums.ForumsClient.Models
{
    public class MyThreadsFolderViewModel : BindableObject,  IFolderViewModel
    {
        #region IFolderViewModel Members

        /// <summary>
        /// The name of the folder
        /// </summary>
        /// <value>The name of the folder.</value>
        public string Name
        {
            get
            {
                return "My Threads";
            }
        }

        #endregion

        /// Gets the threaded forum view model.
        /// </summary>
        /// <value>The threaded forum view model.</value>
        public ThreadedMyThreadsViewModel ThreadedViewModel
        {
            get;
            set;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MyThreadsFolderViewModel"/> class.
        /// </summary>
        /// <param name="user">The user.</param>
        public MyThreadsFolderViewModel(UserLogOnInformation user)
        {
            if (user == null) throw new ArgumentNullException("user", "user must not be null");

            ThreadedViewModel = new ThreadedMyThreadsViewModel(user, Dispatcher.CurrentDispatcher);

        }


        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            return Name;
        }

    }
}
